package eco2automotive.gui.components;
import javax.swing.*;
import java.util.*;

import eco2automotive.data.Protocol;
/** JComboBox object. Show a list of protocols availables.
  * @version 1.0
  * @autor Fco. Javier Sánchez Esparza
 */
public class ComboBoxProtocols extends JComboBox{
    /**
     * Create a Combo Box of the Protocols that contains the 
     * Protocols.xml and was imported from .dat file, sited in directory /data
     * @param a
     */
    public ComboBoxProtocols(ArrayList a){
        for ( Iterator iterador = a.listIterator(); iterador.hasNext(); ) {
                  Protocol p = (Protocol) iterador.next();
                  this.addItem(p.getDescription());
    }
    
    }
}
